package com.forlgb.powercloud.seata.common.rpc;

import com.forlgb.powercloud.seata.common.dto.OrderDTO;
import com.forlgb.powercloud.seata.common.response.ObjectResponse;
import com.forlgb.powercloud.seata.common.rpc.fallback.IFeignOrderClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "seata-order-service",fallback = IFeignOrderClientFallback.class)
public interface IFeignOrderClient {
    /**
     * 扣减账户余额
     */
    @PostMapping("/order/create_order")
    ObjectResponse<OrderDTO> createOrder(@RequestBody OrderDTO orderDTO);
}
